package models;

import javax.persistence.*;

import play.data.validation.*;
import play.db.jpa.Model;

@Entity
public class Address extends Model {
	public String street;
	
	@Match(value="[\\x00-\\x7F]{2,25}", message="Please enter valid city name")
	public String city;
	
	@Match(value="[0-9-]{3,9}", message="Please insert a valid ZIP")
	public String zip;
	
	@Phone(message="Please enter valid phone number")
	public String phone;
	
	public Address(String street, String city, String zip, String phone) {
		super();
		this.street = street;
		this.city = city;
		this.zip = zip;
		this.phone = phone;
	}
}
